﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LuanVanProject
{
    public partial class PPointViewer : Viewer
    {
        string filename = "";
        int ppWnd = 0;
       
        public PPointViewer(string _filename)
        {
            InitializeComponent();
            this.filename = _filename;
        }

        public  override int Open()
        {
            try
            {
                return this.ppWnd = this.powerPointControl1.LoadDocument(filename);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
                return -1;
            }
            
        }

        public override void Close()
        {
            this.powerPointControl1.CloseControl();
        }

        public override void Reactive()
        {
            
             this.powerPointControl1.ReActiveWindow(this.filename);
        }   
    }
}
